package io;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter("note.txt");
        System.out.println("请输入想输入的文字:(exit退出输入)");
        String line = sc.nextLine();
        while(!("exit".equalsIgnoreCase(line))){
            pw.println(line);
            line = sc.nextLine();
        }
        System.out.println("输出完毕");
        pw.close();
    }
}
